#include <stdio.h>
#include<math.h>
double fun(double a)
{
    double x1,x2=1.0;
    while(fabs(x1-x2)>=0.000001)
    {
        x1=x2;
        x2=(x1+a/x1)/2;
    }
    return x2;
}
int main() {
    printf("%lf",fun(3.0));
    return 0;
}